const align = 'center'
const width = '180px'
const isLink = true
// const stockWithGoodsType = 'obtainProcurement' // 门店得到进货额度机构表
// const externalProcurementType = 'externalProcurement' // 对外进货额度机构表
// const moreThen30DayNoSalesAmountType = 'externalProcurement' // 30天以上未动销金额
const creditOrganizationType = 'creditOrganization' // 得到/对外额度机构列表

export const chainTableOption = {
  name: 'chainTableOption',
  columns: [{
    prop: 'organizationName',
    label: '机构名称',
    align,
    fixed: true,
    width
  }, {
    prop: 'organizationId',
    label: '机构编号',
    align,
    fixed: true,
    width
  }, {
    prop: 'orgTypeName',
    label: '机构类型',
    align,
    fixed: true,
    width: '80'
  }, {
    prop: 'creditLimit',
    label: '得到授信进货额度',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'usedCreditLimit',
    label: '已用得到授信进货额度',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'residueLimit',
    label: '剩余得到授信进货额度',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'grantCreditLimit',
    label: '对外授信进货额度',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'usedGrantCreditLimit',
    label: '已用对外授信进货额度',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'residueGrantCreditLimit',
    label: '剩余对外授信进货额度',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'moreThen30DayNoSalesAmount',
    label: '30天以上未动销金额',
    align,
    width,
    isLink,
    type: 'moreThen30DayNoSalesAmount'
  }, {
    prop: 'replenishmentAmount',
    label: '累计铺货补货金额',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'replenishmentSettledAmount',
    label: '累计已结算铺货补货金额',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'accumulatedUnsettledReplenishmentAmount',
    label: '累计未结算补货金额',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'replenishmentCostAmount',
    label: '累计铺货成本金额',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'replenishmentSettledCostAmount',
    label: '累计已结算成本金额',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'replenishmentUnSettledCostAmount',
    label: '累计未结算成本金额',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'chainShaProAmt',
    label: '累计铺货连锁利润金额',
    align,
    width,
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'chainShaProSettledAmt',
    label: '累计铺货连锁利润已结算金额',
    align,
    width: '220',
    isLink,
    type: creditOrganizationType
  }, {
    prop: 'chainShaProUnSettledAmt',
    label: '累计铺货连锁利润未结算金额',
    align,
    width: '220',
    isLink,
    type: creditOrganizationType
  }]
}

export const supplierTableOption = {
  name: 'supplierTableOption',
  columns: [{
    prop: 'organizationName',
    label: '机构名称',
    align,
    fixed: true,
    width
  }, {
    prop: 'organizationId',
    label: '机构编号',
    align,
    fixed: true,
    width
  }, {
    prop: 'creditLimit',
    label: '授信进货额度',
    align,
    isLink,
    type: 'replenishmentAmount'
  }, {
    prop: 'usedCreditLimit',
    label: '已用授信进货额度',
    align,
    isLink,
    type: 'replenishmentAmount'
  }, {
    prop: 'residueLimit',
    label: '剩余授信进货额度',
    align,
    isLink,
    type: 'replenishmentAmount'
  }, {
    prop: 'moreThen30DayNoSalesAmount',
    label: '30天以上未动销金额',
    align,
    isLink,
    type: 'moreThen30DayNoSalesAmount'
  }, {
    prop: 'replenishmentAmount',
    label: '累计铺货金额',
    align,
    isLink,
    type: 'replenishmentAmount'
  }, {
    prop: 'replenishmentSettledAmount',
    label: '累计已结算金额',
    align,
    isLink,
    type: 'replenishmentAmount'
  }, {
    prop: 'accumulatedUnsettledReplenishmentAmount',
    label: '累计未结算金额',
    align,
    isLink,
    type: 'replenishmentAmount'
  }]
}

export default {
  supplierTableOption,
  chainTableOption
}
